<% 'Dim intsubid, cname, cid, sname, sid, strQuote, str, qt, qp, answers, cat_id, intForumId, ctr Dim cname, cid, sname, sid, strQuote, str, qt, qp, cat_id, intForumId LanguageParser.IncludeSection "postform" LanguageParser.IncludeKey "topic", "Thread" LanguageParser.IncludeKey "topic", "Location" LanguageParser.IncludeKey "topic", "Registred" LanguageParser.IncludeKey "topic", "Warnings" '/// Check if user is logged in if not inside <> 0 then response.redirect("default.asp") %> <% '/// Post preview if varSubmit = langPreview then %>
<% =langAuthor %> <% =langThread %>
<%=username%>

<% strSQL = "SELECT mavatar, mplace, mreggad, mwarnings,msign FROM aspbb_members WHERE mid={0}" dim arrPreview objDAL.GetRows arrPreview, 1, strSQL, array(userid) If len(arrPreview(0, 0)) <> 0 then Response.Write "" End if response.write "

 
" %>
<% =langLocation %>: <% =arrPreview(1, 0) %>
<% =langRegistred %>: <% =FormatDateTime(uTimeStamp(arrPreview(2, 0)), vbshortdate) %>    <% =langwarnings %>: <% =arrPreview(3, 0) %>
<%If arrPreview(4, 0) <> "" then%> <%End if%>
<%If Len(varTTitle) > 0 then Response.Write(""& Server.HTMLEncode(varTTitle) &"
") End if%> <% Response.Write ASPBBCode(varbody, varnosmile) %>
__________________
<%= ASPBBCode(arrPreview(4, 0),varnosmile)%>
 

<% end if '/// Get the forumid so it can be passed to the permission functions in inc_permission.asp if request.querystring("fid") <> "" then intsubid = request.querystring("fid") End if if Request.QueryString("FID") = "" and Request.QueryString("tid") <> "" then strSQL = "Select aspbb_topics.tforumid from aspbb_topics where aspbb_topics.tid ={0}" intSubId = objDAL.GetValue(strSQL, array(Request.QueryString("TID"))) End if '// cannot call request after binary read in preview If varSubmit <> langPreview then If request.form("forumId") <> "" then intsubid = request("forumId") End if End if '/// New thread form /// 'Check permission if not moderatesub(userid, intsubid,0) then Response.Write LanguageParser.GetKey("errors", "NoAccess") Response.End End if if cInt(request.querystring("fid")) <> 0 and (request.querystring("type") = "newthread" or request.querystring("new") = "thread") Then Dim arrPath strSQL = "SELECT aspbb_category.cid, aspbb_category.cname, aspbb_subcategory.sid, aspbb_subcategory.sname " & _ "FROM aspbb_category INNER JOIN aspbb_subcategory ON" & _ " aspbb_category.cid = aspbb_subcategory.suid where aspbb_subcategory.sid ={0}" objDAL.open arrPath, strSQL, array(Clng(intSubid)) cname = arrPath(1,0) cid = arrPath(0,0) sname = arrPath(3,0) sid = arrPath(2,0) %> <%= langStart %> > <%=cname%> > <%=sname%> > <% =langNewThread%> <%If ModerateSub(userid, intSubId, 1) then%> <%End if%>
<% =langNewthread %>
<% =langSignedAs %>: <%=userName%>
<% =langWriteTitle %>:
<% =langType %>: 1 then response.write "checked"%> tabindex="0"> <% =langStdTopic %> tabindex="0"> <% =langAnnouncement %>
<% =langWritePost %>:
10 - 20 - 30 <% =langRows %> | <% =langshowsmile %>

 
<% =langAttachment %>:  <% if varSubmit = langPreview then response.write "
" & langReattach & "
" %>
<% =langPoll %>: <% =langCreatePoll %>: >
<% =langPollAlternatives %>:
<% =langOption %>: ><% =langNotifyOnPost %>
><% =langNoSmiley %>


<% '/// Post reply form ElseIf len(Request.QueryString("TID")) <> 0 And Request.QueryString("type") = "newreply" Then dim arrReply strSQL = "SELECT ttitle FROM aspbb_topics WHERE tid={0}" objDAL.open arrReply, strSQL, array(Clng(request.querystring("TID"))) Dim arrQuote If not Isempty(Request.QueryString("qt")) or len(varQt) <> 0 then if varQt = "" then varQt = Request.QueryString("qt") End if strSQL = "SELECT aspbb_members.muser, aspbb_topics.tbody FROM aspbb_topics INNER JOIN aspbb_members ON aspbb_members.mid=aspbb_topics.tmemberid WHERE aspbb_topics.tid ={0}" objDAL.open arrQuote, strSQL, array(varQt) strQuote = strQuote & "[quote=" & arrQuote(0,0) & "]" & arrQuote(1,0) & "[/quote] "& VbCrlf & VbCrlf &"" qt = varQt End if If len(varQp) <> 0 then strSQL = "SELECT aspbb_members.muser, aspbb_posts.pbody FROM aspbb_posts INNER JOIN aspbb_members ON aspbb_members.mid=aspbb_posts.pmemberid WHERE aspbb_posts.pid in ("& varQp &")" objDAL.open arrQuote, strSQL, Empty For i = 0 to Ubound(arrQuote,2) strQuote = strQuote & "[quote=" & arrQuote(0,i) & "]" & arrQuote(1,i) & "[/quote] "& VbCrlf & VbCrlf &"" Next qp = varQp Elseif not Isempty(Request.QueryString("qp")) then strSQL = "SELECT aspbb_members.muser, aspbb_posts.pbody FROM aspbb_posts INNER JOIN aspbb_members ON aspbb_members.mid=aspbb_posts.pmemberid WHERE aspbb_posts.pid ={0}" objDAL.open arrQuote, strSQL, array(Clng(Request.QueryString("qp"))) strQuote = "[quote=" & arrQuote(0,0) & "]" & arrQuote(1,0) & "[/quote]" qp = Request.QueryString("qp") End if %> <%if qp <> "" then Response.Write("&qp="& qp &"") End if%><%if qt <> "" then Response.Write("&qt="& qt &"") End if%>" name="form" method="post" onSubmit="return checkform(this,'newreply')" ENCTYPE="multipart/form-data">
<% =langReplyTo %> <%=arrReply(0,0) %>
<% =langSignedAs%>: <%=userName%>
<% =langWriteTitle %>:
<% =langWritePost %>:
10 - 20 - 30 <% =langRows %> | <% =langshowsmile %>

<% =langAttachment%>:  <% if varSubmit = "Preview" then response.write "
" & langReattach & "
" %>
<% =langOption %>: ><% =langNotifyOnPost %>
><% =langNoSmiley %>


<% '/// Create new poll /// Elseif request.querystring("type") = "poll" Then %> <% answers = Clng(Request.QueryString("answers")) if answers > 10 then answers = 10 End if %>
<% =langNewPoll %>
<% =langSignedAs %>: <%=userName%>
<% =langQuestion %>:
<% =langPollAlternatives %>:
<% =langAlternatives %>: <% For i = 1 to answers Response.Write langAnswer &" " & i & ":
" Next %>
<% =langPollDays %>: (<% =langPollDaysInfo %>:)
<% =langOption %>: " name="topicid">><% =langNotifyOnPost %>
<% '/// Change post or topic form /// Elseif request.querystring("change")="post" or request.querystring("change")="topic" then Dim arrChange if request.querystring("change") = "post" then strSQL = "Select aspbb_posts.ptitle, aspbb_posts.pbody, aspbb_members.muser, aspbb_posts.pforumid, aspbb_posts.pnosmile " & _ "from aspbb_posts inner join aspbb_members on aspbb_posts.pmemberid = aspbb_members.mid " & _ "where aspbb_posts.pid ={0}" if not ModerateSub(userid, intSubId, 1) then strSQL = strSQL & " and aspbb_posts.pmemberid ={1}" end if SOME = "p" elseif request.querystring("change") ="topic" then strSQL = "Select aspbb_topics.ttitle, aspbb_topics.tbody, aspbb_members.muser, aspbb_topics.tforumid, aspbb_topics.tnosmile " & _ "from aspbb_topics inner join aspbb_members on aspbb_topics.tmemberid = aspbb_members.mid " & _ "where aspbb_topics.tid ={0}" if not ModerateSub(userid, intSubId, 1) then strSQL = strSQL & " and aspbb_topics.tmemberid ={1}" end if SOME = "t" end if objDAL.open arrChange, strSQL, array(Request.QueryString("ID"), userID) if EOF(arrChange) then objDAL.Disconnect response.redirect("postform.asp?err=show") else %> &modify=post&type=<%=some%>&id=<%=chkstring(Request.QueryString("ID"),1)%>&tid=<%=chkstring(Request.QueryString("TID"),1)%><%If Request.QueryString("fid") <> "" then Response.Write("&fid="& Request.QueryString("fid") &"")%>" name="form" method="post" onSubmit="return checkform(this, 'newreply')"> <% If SOME = "t" then If ModerateSub(userID, arrChange(3,0), 1) then %> <% End if End if %>
<% =langEdit %>
<% =langWrittenBy %>: <%=arrChange(2,0)%>
<% =langWriteTitle %>:
<% =langSubCat %>: <% Dim arrCat strSQL = "SELECT aspbb_category.cid, aspbb_category.cname, aspbb_subcategory.sid, aspbb_subcategory.sname " & _ "FROM aspbb_category LEFT JOIN aspbb_subcategory ON " & _ " aspbb_category.cid = aspbb_subcategory.suid where aspbb_subcategory.stype = 1" objDAL.open arrCat, strSQL , empty %>
<% =langWritePost%>: 10 - 20 - 30 <% =langRows %> | <% =langshowsmile %>

<% =langOption %>: ><% =langNotifyOnPost %>
> <% =langNoSmiley %>

<% end if Elseif Request.QueryString("action") = "edit_poll" then dim intFindPoll intTopicID = Request.QueryString("tid") strSQL = "Select tforumid from aspbb_topics where tid ={0}" intForumId = cInt(objDAL.GetValue(strSQL, array(intTopicID))) If ModerateSub(userid, intForumId, 1) then strSQL = "Select Count(*) from aspbb_polls where potopicid ={0}" intFindPoll = Cint(objDAL.GetValue(strSQL, array(intTopicID))) if not intFindPoll = 0 then strSQL = "Select poid, poquestion, poanswer, povotes from aspbb_polls where potopicid ={0} order by poisquestion desc, poid asc" objDAL.open arrPoll, strSQL, array(intTopicID) %> <% if Request.QueryString("answers") = "" then answers = (intFindPoll-1) Else answers = Clng(Request.QueryString("answers")) End if if answers > 10 then answers = 10 End if %>
<% =langEditPoll %> -
<% =langQuestion %>: <% =langDeletePoll %>
<% =langPollAlternatives %>:
<% =langAlternatives %>: <% ctr = 1 For i = 1 to Ubound(arrPoll,2) Response.Write langAnswer &" " & ctr & ": " & langClearVotes & " ("& arrPoll(3,i) &") " & langLeaveEmptyDel & "
" ctr = ctr +1 Next if (ctr-1) <> answers then for i = ctr to answers Response.Write "Svar " & i & ":
" Next End if str = (ctr-1) & "," & (i-ctr) %>
<% =langOption %>: " name="posts">
<% End if End if Elseif Request.QueryString("err") = "show" then %>
<% =LanguageParser.GetKey("errors", "ErrorGeneral") %>
<% =LanguageParser.GetKey("errors", "ErrorGeneralLong") %>
<% end if %>
-